import { connect } from 'react-redux';
import Overview from '@/page/Overview';


const mapStateToProps = (state) => {
  return {
    cart: state.cart
  };
};

const mapDispatchToProps = (dispatch) => {
  return {
    addCart: () => dispatch(cartActions.addCart("鱼香肉丝", 1, 20)),
    updateCart: () => dispatch(cartActions.updateCart("鱼香肉丝", 2, 50)),
    deleteCart: () => dispatch(cartActions.deleteFromCart("鱼香肉丝"))
  };
};

export default connect(mapStateToProps , mapDispatchToProps )(Overview);